Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: show error messages again #461

Merged
merged 1 commit into from
Apr 11, 2022
Merged

fix: show error messages again #461

merged 1 commit into from
Apr 11, 2022

Conversation

m1ga
Copy link
Contributor

@m1ga m1ga commented Apr 2, 2022

Fixing the error messages. Currently it is showing:

[ERROR] Error
    at Object.<anonymous> (/Users/miga/Library/Application Support/Titanium/mobilesdk/osx/10.2.0.v20220325163249/node_modules/node-appc/lib/exception.js:34:27)
    at Module._compile (internal/modules/cjs/loader.js:1085:14)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1114:10)
    at Module.load (internal/modules/cjs/loader.js:950:32)
    at Function.Module._load (internal/modules/cjs/loader.js:790:12)
    at Module.require (internal/modules/cjs/loader.js:974:19)
    at require (internal/modules/cjs/helpers.js:93:18)
    at Object.get (/Users/miga/Library/Application Support/Titanium/mobilesdk/osx/10.2.0.v20220325163249/node_modules/node-appc/lib/appc.js:62:11)
    at Handle.<anonymous> (/Users/miga/Library/Application Support/Titanium/mobilesdk/osx/10.2.0.v20220325163249/iphone/cli/hooks/install.js:207:22)
    at Handle.emit (events.js:412:35)

with this I'm getting the error messages like Failed to launch iTunes again.

Test:

  • attach an ios device
  • start a compile to device
  • detach the cable while the build is running

I got the hint from this stackoverflow post and it looks like it has been like this before and it was change to be new Error(). It might be a change in node that will show the node error stack instead of our error messages.
AppcException.prototype = Error.prototype; works too but according to the SO article it is a "bad form".

@hansemannn hansemannn requested a review from cb1kenobi April 3, 2022 16:09
@hansemannn
Copy link
Contributor

@cb1kenobi Can you please take a peek?

@cb1kenobi
Copy link
Contributor

I like this. Since I don't have the ability to actually test this, what does an error look like when an exception is thrown?

@m1ga
Copy link
Contributor Author

m1ga commented Apr 11, 2022

just the "normal" red error messsage:
2022-04-11_18-43

top: with this fix, bottom: current version

Copy link
Contributor

@cb1kenobi cb1kenobi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants